package com.rxyb.provider.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.messaging.Processor;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author YJH
 * @version 1.0
 * @description
 * @date 2020/6/3  13:13
 */
@RestController
public class InitController {

    @Autowired
    private Processor pipe;

    @GetMapping(value = "init")
    public String init() {
        pipe.output().send(MessageBuilder.withPayload("init").build());
        return "SUCCEED";
    }
}
